rune
An embeddable dynamic programming language for Rust.
Contributing
If you want to help out, there should be a number of optimization tasks available in Future Optimizations. Or have a look at Open Issues.
Create an issue about the optimization you want to work on and communicate that you are working on it.
Highlights of Rune
- Clean Rust integration 💻.
- Memory safe through reference counting 📖.
- Template strings 📖.
- Try operators 📖.
- Pattern matching 📖.
- Structs and enums 📖 with associated data and functions.
- Dynamic vectors 📖, objects 📖, and tuples 📖 with built-in serde support 💻.
- First-class async support 📖.
- Generators 📖.
- Dynamic instance functions 📖.
- Stack isolation 📖 between function calls.
- Stack-based C FFI, like Lua's (TBD).
Rune scripts
You can run Rune programs with the bundled CLI:
cargo run -- scripts/hello_world.rn
If you want to see detailed diagnostics of your program while it's running, you can use:
cargo run -- scripts/hello_world.rn --dump-unit --trace --dump-vm
See --help
for more information.
Running scripts from Rust
You can find more examples in the
examples
folder.
The following is a complete example, including rich diagnostics using
termcolor
. It can be made much simpler if this is not needed.
use ;
use EmitDiagnostics as _;
use ;
use Error;
use Arc;
async